package io.ganguo.chat.core.util;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by Tony on 2/20/15.
 */
public class DateUtils {
    public static String date2str(Date date) {
        SimpleDateFormat myFmt = new SimpleDateFormat("yyyy-MM-dd  HH:mm:ss");
        return myFmt.format(date).toString();
    }

    public static String date2str(Long time) {
        Date date = new Date(time);
        return date2str(date);
    }
}
